package com.college.populator.impl;

import javax.servlet.http.HttpServletRequest;

import com.college.domain.CourseDetails;
import com.college.populator.CourseDetailsPopulator;

public class CourseDetailsPopulatorImpl implements CourseDetailsPopulator{

	@Override
	public void courseDetailsPopulation(HttpServletRequest request,
			CourseDetails courseDetails) {

		courseDetails.setCourseCode(request.getParameter("courseCode"));
		courseDetails.setCourseName(request.getParameter("courseName"));
		courseDetails.setCourseBranch(request.getParameter("courseBranch"));
		courseDetails.setCourseDuration(Integer.parseInt(request.getParameter("courseDuration")));
		courseDetails.setCourseIntake(Integer.parseInt(request.getParameter("courseIntake")));
	}

}
